package org.jeecg.modules.sggg.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.sggg.entity.SgServicePackage;
import org.jeecg.modules.sggg.mapper.SgServicePackageMapper;
import org.jeecg.modules.sggg.service.ISgServicePackageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 服务包表
 * @Author: jeecg-boot
 * @Date: 2022-10-17
 * @Version: V1.0
 */
@Service
public class SgServicePackageServiceImpl extends ServiceImpl<SgServicePackageMapper, SgServicePackage> implements ISgServicePackageService {

    @Autowired
    private SgServicePackageMapper sgServicePackageMapper;

    @Override
    public IPage<SgServicePackage> queryList(Page<SgServicePackage> page, SgServicePackage sgServicePackage) {
        return sgServicePackageMapper.queryList(page, sgServicePackage.getName(), sgServicePackage.getStatus());
    }

    @Override
    public List<SgServicePackage> packageItemList(SgServicePackage sgServicePackage) {
        return sgServicePackageMapper.packageItemList(sgServicePackage.getName(), sgServicePackage.getType());
    }
}
